package org.dromara.system.domain.vo;

import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import org.dromara.system.domain.SysCityRegion;

import java.io.Serial;
import java.io.Serializable;


/**
 * 地址（省市区）三级联动视图对象 sys_city_region
 *
 * @author packet
 * @date 2025-09-25
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = SysCityRegion.class)
public class SysCityRegionVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 431614804305339244L;

    /**
     * 主键id
     */
    @ExcelProperty(value = "id")
    private Long id;

    /**
     * 区域名称
     */
    @ExcelProperty(value = "区域名称")
    private String name;

    /**
     * 区域上级标识
     */
    @ExcelProperty(value = "区域上级标识")
    private Long pid;

    /**
     * 地名简称
     */
    @ExcelProperty(value = "地名简称")
    private String shortName;

    /**
     * 区域等级（0:国家 1:省 2:市 3:区）
     */
    @ExcelProperty(value = "区域等级", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "0=:国家,1=:省,2=:市,3=:区")
    private Long level;

    /**
     * 区域编码
     */
    @ExcelProperty(value = "区域编码")
    private String cityCode;

    /**
     * 邮政编码
     */
    @ExcelProperty(value = "邮政编码")
    private String postalCode;

    /**
     * 组合名称
     */
    @ExcelProperty(value = "组合名称")
    private String merName;

    /**
     * 是否热门（N:否 Y:是）
     */
    @ExcelProperty(value = "是否热门", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "sys_yes_no")
    private String isHot;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;


}
